
require("./config/global_config")
require("./hg/server.js")
require("./http_server.js")
const websocket = require("./websocket")
const Controller = require("./controller")
const PS3838Client = require("./ps3838api")
const Titan007 = require("./titan007.js")
const websocketOrder = require("./websocket_order")
// 全局变量：用 Map 保存全部最新数据
const latestMergedMap = new Map();
const controller = new Controller()
const titan007 = new Titan007()


const orderClient = new PS3838Client({
    username: 'BIA00030TP',
    password: 'wwss2233'
});



async function main() {
    let balance = await orderClient.getBalance() // 获取余额，验证登录
    global.log(`PS3838 订单账号余额：${JSON.stringify(balance)}`)
}

function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}


main()

